package com.example.erp.sys.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.erp.sys.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.erp.sys.vo.UserVo;

import java.util.Set;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author LiQiCheng
 * @since 2022-01-26
 */
public interface UserService extends IService<User> {
    User findUserByName(String userName);

    /**
     * 分页查询用户列表
     *
     * @param page   分页信息
     * @param userVo 查询条件对象
     * @return
     * @throws Exception
     */
    IPage<User> findUserListByPage(IPage<User> page, UserVo userVo) throws Exception;

    Set<Integer> findUserRoleByUserId(int id) throws Exception;

    boolean saveUserRole(int userId, String roleIds) throws Exception;
}
